home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d26
/
ccicap.arc
/
CCICAP.DOC
next >
Wrap
Text File
|
1989-10-21
|
101KB
|
3,660 lines
C C I C A P U S E R ' S G U I D E
10/20/89
CCICAP Version 4.09
(C) Copyright 1988, 1989, Circuit Concepts Inc.
All Rights Reserved.
CCICAP User's Guide
Table of Contents
Section Page
-----------------------------------------------------------
INTRODUCTION ............................................ 1
STARTING CCICAP ......................................... 3
PROGRAM REQUIREMENTS, LIMITS ............................ 4
INPUT FILE DESCRIPTION .................................. 6
Postfix operators for reals ........................... 6
.TITLE Record ......................................... 8
.INC Record ........................................... 8
.PAGE Record .......................................... 9
.OPT Record ........................................... 9
.FILE Record ......................................... 11
.TEMP Record ......................................... 12
.MODEL Record ........................................ 13
Op-Amp Parameters .................................. 14
FET parameters ..................................... 15
BJT parameters ..................................... 16
.CALC Record ......................................... 17
.STDR Record ......................................... 19
.STDC Record ......................................... 20
.STDL Record ......................................... 21
.AC Record ........................................... 22
.DC Record ........................................... 23
.SENSA Record ........................................ 24
.SENSR Record ........................................ 25
.MSENS Record ........................................ 26
.WSENS Record ........................................ 26
.SSENS Record ........................................ 26
.NOISE Record ........................................ 27
NOISE record options ............................... 27
.VARY Record ......................................... 29
.DELAY Record ........................................ 31
.FSCALE Record ....................................... 32
.ZSCALE Record ....................................... 32
.TRAN Record ......................................... 33
.IC Record ........................................... 34
.PLOT Record ......................................... 35
Predefined PLOT names .............................. 36
PLOT pointer variables ............................. 37
PLOT scaling limits ................................ 37
PLOT files ......................................... 37
.ZDLY Record ......................................... 40
.CKT Record .......................................... 41
Element records .................................... 41
TWO TERMINAL ELEMENTS .............................. 41
Input Voltage Source ............................. 41
Input Current Source ............................. 41
Resistor ......................................... 41
Conductance ...................................... 41
Capacitor ........................................ 41
Inductor ......................................... 42
Voltmeter ........................................ 42
Ammeter .......................................... 42
Input Node (digital system element) .............. 42
Output Node (digital system element) ............. 42
Multiplier Branch (digital system element) ....... 42
Delay Branch (digital system element) ............ 42
MULTI-TERMINAL ELEMENTS ............................ 43
Ideal Operational Amplifiers ..................... 43
Bipolar Junction Transistor ...................... 43
CONVERTERS ......................................... 44
Current to Current Converter ..................... 44
Current to Voltage Converter ..................... 44
Voltage to Current Converter ..................... 44
Voltage to Voltage Converter ..................... 44
.END Record .......................................... 45
.ALTEL Record ........................................ 45
.ALTGO Record ........................................ 46
.NEXT Record ......................................... 47
.STOP Record ......................................... 47
Suggested Practice ..................................... 48
Order of input records ............................... 48
File naming convention ............................... 48
Batch file use ....................................... 49
Excessive output ..................................... 49
Plot only runs ....................................... 49
References ............................................. 51
Appendix A
Binary Data Files Contents and Output Data Structures 52
Appendix B
Noise Models ......................................... 55
Resistor noise ..................................... 55
Op-amp noise ....................................... 55
BJT noise .......................................... 56
FET noise .......................................... 56
Registration Form ...................................... 57
(C) Copyright 1989 Circuit Concepts, Inc. - All Rights Reserved.
License Statement
This software is protected by Copyright Law in the United States
and in foreign countries. It must be handled in a manner which
allows for no more than one person to use it at any one time.
Backup copies can be made and the software may be moved from
computer to computer as long as only one person can use it at a
time.
Disclaimer of Warranty
This software and manual are provided "as is" without warranty of
any kind, either expressed or implied, including but not limited
to the implied warranties of merchantability and fitness for a
particular purpose. Any liability of manufacturer will be limit-
ed exclusively to product replacement or refund of the purchase
price.
Circuit Concepts, Inc.
6955 Santa Fe Dr.
Houston, Texas 77061
Office : 1-713-643-5451
FAX : 1-713-643-6131
INTRODUCTION
CCICAP is a powerful, easy to use linear circuit analysis pro-
gram. The program can be used to study a wide range of circuit
behavior. CCICAP includes passive circuit elements such as
resistors, capacitors, and inductors as well as controlled ele-
ments such as voltage to current converters and ideal operational
amplifiers. There are built in models for bipolar junction
transistors, field effect transistors, and operational amplifi-
ers.
Four digital elements are included to allow the analysis of
digital filters and other digital systems in the frequency do-
main.
The user of CCICAP can specify voltmeters and ammeters at any
point in the circuit so that circuit operation can be easily
monitored. In addition, user specified calculated relationships
among inputs and outputs can be obtained. Output is produced to
a printable ASCII file specified by the user, and optionally to
binary data files.
CCICAP provides both frequency and time domain analysis capabili-
ties.
In the frequency analysis mode, CCICAP provides circuit responses
at specified frequencies. In addition, CCICAP can provide fre-
quency dependent response sensitivities to specified network
elements. Multiparameter, worst case, and RMS sensitivities to a
user specified component set are available. Circuit noise from
resistors and active elements may also be obtained. The noise
analysis can provide the total circuit noise at a requested node
or the noise resulting from a selected set of circuit elements at
a requested node. Integrated noise over a user specified band-
width is provided as part of the noise analysis. As part of a
frequency analysis the user may request that selected circuit
element values be varied and the corresponding circuit responses
be calculated.
In the time domain analysis mode, CCICAP provides either impulse
or step responses.
CCICAP uses an easy to understand and use input syntax. The
circuit nodes are assigned unique names by the user. For exam-
ple, an output node could be named 'Eout'. This capability
results in easy to read circuit descriptions. The only pre-
assigned node name is that for the ground or reference node.
Ground may be called '0', 'GND', 'Gnd', or 'gnd'. The circuit
elements are also assigned unique names by the user, adding to
the self-documenting nature of the input circuit description.
Comments can be added on the element and control records and as
completely separate comment records.
1
Several convenience features are provided by CCICAP. The units
used for the AC analysis results can be set as real and imagi-
nary, dB and phase, or magnitude and phase. The frequency and
phase units for an AC analysis can be specified as either Hertz
and degrees or radians per second and radians. Standard passive
element decades can be specified and the corresponding element
values will be adjusted to the standard decade values before
analysis. Frequency and impedance scaling is easily done.
Calculated response relationships can be specified using defined
outputs as variables. Labeled, automatically scaled, line print-
er and graphics response plots can be obtained. Page length can
be set by the user. Information about the system matrices can be
obtained.
CCICAP is based on a modified nodal formulation as described by
J. Vlach and K. Singhal [1].
2
STARTING CCICAP
CCICAP is invoked by the following command line:
>ccicap inputfile outputfile
where 'inputfile' is the name of an existing circuit description
file. 'inputfile' may include drive and or path information if
the file does not exist in the same directory from which CCICAP
is initiated. 'outputfile' is the name given by CCICAP to the
ASCII output (results) file. 'outputfile' may include drive and
or path information. If no path is given, 'outputfile' is creat-
ed in the directory from which CCICAP is initiated. If 'outpu-
tfile' is set to 'con' the ASCII output from CCICAP will be
directed to the system monitor (crt). If 'outputfile' is set to
'prn' the ASCII output from CCICAP will be directed to the system
printer. If 'outputfile' is set to 'nul' the ASCII output from
CCICAP will not be generated. 'inputfile' and 'outputfile' must
not be the same file name if they are to exist in the same direc-
tory.
Examples:
D:>ccicap my_ckt.inp my_ckt.out
E:>d:\ccicap\ccicap f:\ckts\my_ckt.inp con
3
PROGRAM REQUIREMENTS, LIMITS
Hardware Requirements: IBM or compatible PC/XT/AT
395,000 bytes of free RAM.
Operating System : MSDOS 2.x, 3.x.
Co-Processor support : Will use an 8087, 80287, or 80387 if one
is installed. Co-processor is not
required.
Program limits:
Circuit equations * <= 100
Elements <= 300
Models ** <= 10
Parameters / model <= 15
Requested outputs <= 30
Requested VARY elements / run <= 5
Requested PLOTs / run <= 5
Points / output / PLOT <= 600
Input sources <= 10
Requested SENSitivities <= 60
Specified initial conditions <= 30
Specified noise source elements <= 60
Real parameters / record <= 60
Integer parameters / record <= 60
Text parameters / record <= 60
Values in resistor standard decade <= 192
Values in capacitor standard decade <= 24
Values in inductor standard decade <= 24
Characters in 'filename' on .INC records <= 60
If the number of nodes, elements, models, outputs, or input
sources is exceeded, an error warning is issued to the ASCII
output file and processing continues with the NEXT circuit de-
scription if present. If the number of plots, VARY elements,
sensitivities, initial conditions, or noise source elements is
exceeded, the excess requests are ignored, a warning is issued to
the ASCII output file, and processing of the current circuit
continues.
4
* A circuit equation is generated for each node defined in the
circuit description (excluding the ground node). Additional
equations are generated for certain element types as follows:
Element type Additional equations
-----------------------------------
CCC 1
VVC 1
V 1
IOA 1
L 1
CVC 2
AM 1
BJT 1
FET 1
OA 2
** An individual model may be used several times within a circuit
description. The limit is on the number of distinct models which
may be defined within one analysis.
5
INPUT FILE DESCRIPTION
CCICAP is controlled from an input file. This file is a standard
ASCII formatted file which contains the circuit description,
analysis requests, and model definitions. The file can be gener-
ated using an editor which produces ASCII files. Most word
processors can be used in a straight ASCII mode, for example
Wordstar in the non-document mode. The following definitions
apply to the input file records:
Any record which starts with a '*' or a single apostrophe (') in
column one is ignored by CCICAP. Any information on a record
beyond a '*' or a single apostrophe (') is ignored by CCICAP.
This is useful for adding comments to the input circuit descrip-
tion file.
Definitions:
Integer : number, up to four digits, no embedded ' ',
',', or '.' allowed in the field.
Text : up to four characters, no embedded ' ', ',',
or '.' allowed in the field.
Real : number, must have a '.' in the field. No
embedded ' ' or ',' in the field.
I1, I2, ... : integer parameters on control records.
T1, T2, ... : text parameters on control records.
F1, F2, ... : real parameters on control records.
Postfix operators for reals
Real parameters may optionally be modified with a postfix opera-
tor. Postfix operators are used to specify powers of ten. The
following entries in an F parameter field all represent the same
real number:
1.234e-2, 1.234E-02, .01234, 12.34mvolts, 12.34m, 12340.u,
12340.Uamps, .00000001234Mohms
The following postfix operators are supported:
Operator Scale Factor
-------- ------------
f, F 1.e-15
p, P 1.e-12
n, N 1.e-09
u, U 1.e-06
l, L, m 1.e-03
k, K 1.e+03
M 1.e+06
g, G 1.e+09
t, T 1.e+12
6
Any text following the postfix operator, up to the next delimit-
er, is ignored. In addition, the percent sign may be used as a
postfix operator in some types of records to indicate a percent-
age deviation from a nominal value. See for example the descrip-
tion of the VARY record.
Input records can be up to 78 characters in length.
The circuit analysis is controlled by several run control re-
cords. The available run control records and their usage is
documented on the following pages. Run control records start
with a period ('.') in column one.
CCICAP is sensitive to alphabetic case. Note that the element
type codes (R, L, C, OA, etc.) and run control records (NEXT, AC,
etc.) must be in upper case. The element names and node names
may be in mixed case. Note that the following two element re-
cords describe two distinct resistors between two distinct node
pairs:
R, r1, es, eo, 1.e3 * Resistor r1 between nodes es and eo.
R, R1, eS, Eo, 10.e4 * Resistor R1 between nodes eS and Eo.
See element entry descriptions under CKT record below.
7
.TITLE Record
The title is printed at the top of each page of the output file
and on each plot.
Example:
.TITLE Analysis of FDNR Based Active 8'th Order Filter
.INC Record
A CCICAP input file can refer to other files by use of the IN-
Clude record. The structure of the INClude record is:
.INC filename
where 'filename' is the name of an existing file which is to be
included in the input file. The filename is not quoted. The
filename may include drive and path information in the standard
DOS format. The records of the named file are logically added in
place of the INC record. This feature is useful for adding often
used models, control records, standard decades, circuit altera-
tion records, etc. The items may be described in files by them-
selves and referred to by any number of different input files.
INCluded files may contain .INC records referring to additional
INClude files as long as the resulting input file is correct.
After an included file is processed control returns to the call-
ing file at the record following the .INC record. The depth of
nesting of INClude files is limited by the number of files which
may be open at any one time. This limit can be controlled with
the MSDOS FILES=NN record in the CONFIG.SYS file.
Examples:
.INC a:\models\op21.mdl * include contents of file
* 'a:\models\op21.mdl' here.
.INClude lpf.ckt * include contents of file 'lpf.ckt' here.
8
.PAGE Record
The PAGE record enables automatic pagination at a specified
number of lines for the ASCII output file. If the PAGE record in
not included, form feeds will be generated at the beginning of
each section in the ASCII output file but will not be generated
within a section. For example, the AC analysis results will
start at the top of a page but the results may extend beyond the
end of this page with no form feeds.
If the PAGE record is included, form feeds will be generated at
the beginning of each section in the ASCII output file and will
additionally be generated to prevent more than a specified number
of lines to be output to any one page.
Examples:
.PAGE * lines / page is unlimited (same as not
* including the .PAGE record)
.PAGE 60 * limits lines / page to <= 60.
.OPT Record
The OPTion record is used to set certain operational aspects of
CCICAP (see below) and to request information about the equation
formulation used by CCICAP. The OPTion record is parsed from
left to right so that in the event of conflicting requests, the
last request will dominate.
The following options and their actions are supported:
NTAB : Causes CCICAP to print out the variable headings for
AC, DC, VARY, and TRANsient analyses but to not print out the
tabular data in the ASCII output file. This option might be used
to suppress tabular data and reduce the size of the output file
when high resolution plots are going to be produced and used as
the primary output. It can also be used when the output is
directed to the screen (using 'con' as the output file) and the
user doesn't want to see the tabular data scroll by.
PLTF : CCICAP will direct plots to named disk files in the
default directory. This is the default operating mode. This
feature is included to allow plot redirection with the ALTGO
record.
PLTP : CCICAP will direct plots to the attached 'PRN' device
(normally the system printer) (see PLTF above). Do not use this
option if the normal ASCII output has been routed to the 'PRN'
device.
9
DB : CCICAP will produce output from a requested AC analysis
in dB and phase format. This is the default format.
MAG : CCICAP will produce output from a requested AC analy-
sis in magnitude and phase format.
R&I : CCICAP will produce output from a requested AC analy-
sis in real and imaginary format.
HZ : CCICAP will use Hertz and degrees as the units of
frequency and phase for AC analyses. This are the default units.
RPS : CCICAP will use radians per second and radians as the
units of frequency and phase for AC analyses.
SIZE : CCICAP will print out the following information about
the circuit and the circuit description matrix:
#outs : number of requested outputs.
#ins : number of specified inputs.
#elem : number of elements in the circuit description.
nodes : number of user specified nodes in the circuit
(does not include the ground node).
szmat : size of the circuit description matrix
(number of equations).
order : order of the circuit.
MAT : CCICAP will print out the circuit description matrices
and the source vector. This option can produce copious amounts
of output and should be used accordingly.
Examples:
.OPT SIZE * request information about formulation.
.OPT SIZE MAT * request above and the matrices.
.OPT NTAB * suppress all tabular data printout.
.OPT SIZE MAT NTAB PLTP * all of the above and
* direct plots to prn.
.OPT MAG RPS * use magnitude and phase,
* radians per second and radians.
.OPT PLTP PLTF * a do-nothing request.
.OPT PLTF * another do-nothing request (PLTF defaults).
10
.FILE Record
Activates automatic creation of binary output data files. The
'.' before FILE must be in the first column of the record. The
data files will be created on the default directory and will have
names given by
DATAmmnn.AC and/or DATAmmnn.TR and/or VARYmmnn.AC
where mm refers to the current circuit description and nn refers
to the alteration number for the current circuit. The first
analysis of a run generates files named DATA0000 and/or VARY0000.
The first alteration of this circuit (see ALTEL and ALTGO records
below) generates files named DATA0001 and/or VARY0001. The
second circuit, defined after a NEXT record, generates files
named DATA01nn and/or VARY01nn. The data calculated during the
AC analysis will be placed in DATAmmnn.AC and/or VARYmmnn.AC and
the data produced during the TRANsient analysis will be placed in
DATAmmnn.TR.
If a FILE record is included in a circuit description, the title
is saved to a file named as
TITLmmnn.TXT
where the mm and nn fields are incremented as described for the
DATAmmnn files.
If no FILE or PLOT record is included in a circuit description,
the binary data files are not produced. Data files from the
individual analyses within a multiple analysis run can be con-
trolled by the use of the FILE record. Binary data files are
always produced if one or more PLOT requests are made.
Example:
.FILE
Binary output data files can be used by post processors.
11
.TEMP Record
The TEMP record is used to change the assumed temperature in the
circuit. If a TEMP record is not included, all calculations
assume a temperature of 298.16 degrees K (25 degrees C). The
TEMP record contains one parameter:
F1
where F1 is the circuit temperature in degrees C.
The temperature is used in calculating the noise from resistors
according to the Johnson noise formula:
En = SQRT(4.0 * k * T * B * R)
where k is Boltzman's constant (1.38E-23), T is the resistor
temperature in degrees K, B is the noise bandwidth in Hertz, and
R is the resistance in ohms.
The temperature is not used in the calculation of noise from
operational amplifiers or transistors. The noise spectral densi-
ties set in the model descriptions are used at all temperatures.
Examples:
.TEMP * sets temperature to 0.0 C.
.TEMP -55. * sets temperature to -55.0 C.
12
.MODEL Record
If models are used, the model name and parameters are given on a
MODEL record. Each model to be used in the circuit description
must have an associated MODEL record and must be named and de-
fined before the CKT section of the input file. The structure of
the MODEL record is :
.MODEL name F1, F2, ...
where 'name' is the text name given to the model and is referred
to from the circuit description and F1, F2, ... are the parame-
ters for the model.
Models are available for op-amps, field effect transistors, and
bipolar junction transistors.
MODEL records may span more than one line by using a continuation
record. Continuation records must have a + in the first column.
Comments and INClude records are not allowed within a group of
continuation records. See the examples below.
13
Op-Amp Parameters:
F1 : Differential input resistance Rin (ohms).
F2 : Common mode input resistance Rcm (ohms).
F3 : Gain bandwidth product GBWP (Hertz).
F4 : Open loop gain Ao (V/V).
F5 : Output resistance Ro (ohms).
F6 : Second pole frequency (Hertz).
F7 : Input noise voltage spectral density (V/SQRT(Hz)).
F8 : Input noise current spectral density (A/SQRT(Hz)).
F9 : Input voltage 1/f noise corner frequency (Hertz).
F10: Input current 1/f noise corner frequency (Hertz).
The second pole frequency defaults to infinity. The noise
sources default to zero amplitude. The 1/f corner frequencies
default to zero Hertz. See Appendix B for more information on
the op-amp noise sources.
Examples:
* lm741 model, Rin = 2M, Rcm = 5G, GBWP = 1MHz, Ao = 200k
* Ro = 75, no second pole, no noise.
.MODEL 741 2.e6 5.e9 1.e6 2.e5 75.
* op21 model, Rin = 10M, Rcm = 10G, GBWP = 600KHz, Ao = 2M
* Ro = 1k, second pole at 500KHz
* en = 20 nV/SQRT(Hz), in = .3 pA/SQRT(Hz)
* 1/f(en) = 8 Hz, 1/f(in) = 30 Hz.
.MODEL op21 10.e6 10.e9 6.e5 2.e6
+ 1.e3 5.e5
+ 2.e-8 .3e-12
+ 8. 30.
The comment (*) records are ignored by CCICAP.
14
FET parameters:
F1 : Drain to source resistance Rds (ohms).
F2 : Transconductance Gm (mhos).
F3 : Gate to source capacitance Cgs (farads).
F4 : Gate to drain capacitance Cgd (farads).
F5 : Drain to source capacitance Cds (farads).
F6 : Drain bias current Id (Amps).
F7 : Gate current Ig (Amps).
F8 : Drain shot noise 1/f frequency (Hertz).
F9 : Gate shot noise 1/f frequency (Hertz).
The noise sources are determined from the Gm, Id, and Ig parame-
ters. See Appendix B for more information on FET noise sources.
Example:
* FET with Rds = 10K, Gm = .005, Cgs = 6pfd, Cgd = 2pfd,
* Cds = 1.5pfd, Id = 200uA, Ig = 50 pA,
* 1/f(drain) = 100Hz, 1/f(gate) = 1KHz.
.MODEL FET1 1.e4, .005, 6.e-12, 2.e-12, 1.5e-12, 2.e-4
+ 5.e-11, 100., 1.e3
15
BJT parameters:
F1 : Base spreading resistance Rbb' (ohms).
F2 : Active base to emitter resistance Rb'e (ohms).
F3 : Collector to active base resistance Rcb' (ohms).
F4 : Collector to emitter resistance Rce (ohms).
F5 : Transconductance Gm (mhos).
F6 : Active base to emitter capacitance Cb'e (farads).
F7 : Collector to active base capacitance Ccb' (farads).
F8 : Collector to emitter capacitance Cce (farads).
F9 : Collector bias current Ic (Amps).
F10: Base bias current Ib (Amps).
F11: Collector shot noise 1/f frequency (Hertz).
F12: Base shot noise 1/f frequency (Hertz).
The noise sources are determined from the Rb'e, Ic, and Ib param-
eters. See Appendix B for more information on BJT noise sources.
Example:
*2N2222 with Rbb' = 60, Rb'e = 2.58K, Rcb' = 5.16M
* Rce = 333K, Gm = .0388, Cb'e = 30pfd
* Ccb' = 2.5pfd, Cce = 8pfd, Ic, Ib defaulted
* 1/f(collector) = 200Hz, 1/f(base) = 100Hz.
.MODEL 2N2222 60., 2.58e3, 5.16e6, 3.33e5, .0388, 30.e-12
+ 2.5e-12, 8e-12, 0., 0., 200., 100.
The parameters Gm, Rb'e, Ic and Ib are used as follows:
If Gm and Rb'e are specified and Ic and Ib are set to 0.0 then Ic
and Ib are estimated by CCICAP as:
Ic = Vt * Gm
Ib = Vt / Rb'e
where Vt is kT/q. The estimated values are used in any subse-
quent noise calculations.
If Ic and Ib are specified as positive and Gm and Rb'e are set to
0.0 then Gm and Rb'e are estimated by CCICAP as:
Gm = Ic / Vt
Rb'e = Ic / (Ib * Gm).
If Ic and Ib are specified as positive and Gm and Rb'e are speci-
fied then Gm and Rb'e are not changed and Ic and Ib are used in
the noise calculation for the device.
If Ic and Ib are specified as negative, their values are set to
zero and there will be no noise contribution from them. Gm and
Rb'e are not changed and must be specified.
16
.CALC Record
Each CALC record defines a calculated response. The format for
the CALC record is as follows:
.CALC name T1 T2 T3
where 'name' is the name given by the user to the calculated
response. T1 is the name of the first input, output, or PREVI-
OUSLY defined CALC response variable to be used in the calcula-
tion and T3 is the name of the second input, output, or previous-
ly defined CALC response variable to be used in the calculation.
T1 and T3 must be names of requested voltmeter or ammeter outputs
from VM or AM records, names of defined input sources from V or I
records, or names of previously defined CALC responses. T2
defines the calculation to be performed and can be any one of the
following:
T2 Operation
--------------
+ T1 + T3 (addition)
- T1 - T3 (subtraction)
X T1 X T3 (multiplication)
/ T1 / T3 (division)
^ T1 ^ T3 (exponentiation)
Calculations are performed in the natural units (volts, amps,
etc.) and then converted to any requested output format such as
dB or magnitude.
If a division calculation results in a divide by zero attempt, an
error message is added to the ASCII output file and the result is
set to 0.0.
Constants can be used in CALC records by defining sources in the
CKT section which are numerically equal to the desired constant.
17
Examples:
.CALC Gm Eout / Iin
calculates the ratio of the variable 'Eout' to the variable 'Iin'
and names the ratio 'Gm'. 'Eout' and 'Iin' must be requested
inputs and or outputs for the current analysis.
.CALC Watt e45 * i53
calculates the product of the variables 'e45' and 'i53' and names
the result 'Watt'. 'e45' and 'i53' must be requested inputs or
outputs for the current analysis.
.CALC Watt e45 * i53
.CALC Wsqr Watt * Watt
calculates the product of the variables 'e45' and 'i53', then
calculates the square of Watt as Wsqr. Watt must be a unique
variable name and must be defined as a CALC variable before Wsqr
is defined.
.CALC Gm Icq / Vt
calculates Gm from the variables Icq and Vt. If Vt represents
the thermal voltage (k*T/q) it can be defined in the CKT section
as follows:
V Vt 0 xxxx .0258
where node xxxx is otherwise unused.
18
.STDR Record
This record is used to define an optional standard resistor
decade. If present before the CKT record (see below), the STDR
record will force the use of resistor values taken from a stand-
ard decade. Standard decades are defined by resistor manufactur-
ers and indicate what values are available for a particular
resistor series. For example, the one percent standard resistor
decade has 96 values between 1.0 and 10.0. The one percent
standard decade could be defined to CCICAP with the following
record:
.STDR 1.00 1.02 1.05 1.07 1.10 1.13 1.15 1.18 1.21 1.24 1.27 1.30
+ 1.33 1.37 1.40 1.43 1.47 1.50 1.54 1.58 1.62 1.65 1.69 1.74
+ 1.78 1.82 1.87 1.91 1.96 2.00 2.05 2.10 2.15 2.21 2.26 2.32
+ 2.37 2.43 2.49 2.55 2.61 2.67 2.74 2.80 2.87 2.94 3.01 3.09
+ 3.16 3.24 3.32 3.40 3.48 3.57 3.65 3.74 3.83 3.92 4.02 4.12
+ 4.22 4.32 4.42 4.53 4.64 4.75 4.87 4.99 5.11 5.23 5.36 5.49
+ 5.62 5.76 5.90 6.04 6.19 6.34 6.49 6.65 6.81 6.98 7.15 7.32
+ 7.50 7.68 7.87 8.06 8.25 8.45 8.66 8.87 9.09 9.31 9.53 9.76
The values must be >= 1.0 and < 10.0 and must be in increasing
order as in the example above.
If a STDR record is processed before the CKT record, any resistor
values specified in the circuit will be changed to the closest
standard decade value. For example, a resistor specified as:
R r23 nd1 nd2 3.50843e3
will be changed to a resistor with value 3.48e3 ohms. The new
value, selected from the standard decade, will be shown on the
circuit listing in the ASCII output file.
Standard resistor decades are easily added and removed from an
analysis by the use of the INC feature. For example, the fol-
lowing record would add a standard decade to an analysis:
.INC stdr.1
assuming that the file stdr.1 existed and consisted of the STDR
record shown above. To remove the standard decade, the INC
record could be commented out:
*.INC stdr.1
There are two ways to specify resistor values that are not modi-
fied by a specified standard decade. A resistor can be specified
as an equivalent conductance using a G type element (see CKT
section). The values of G elements are not changed by the
presence of a standard decade. Additionally, elements whose
values are changed via an ALTEL record are not forced to be from
a specified standard decade.
19
.STDC Record
This record is used to define an optional standard capacitor
decade. If present before the CKT record (see below), the STDC
record will force the use of capacitor values taken from a stand-
ard decade. Standard decades are defined by capacitor manufac-
turers and indicate what values are available for a particular
capacitor series. For example, the ten percent standard capaci-
tor decade has 12 values between 1.0 and 10.0. The ten percent
standard capacitor decade could be defined to CCICAP with the
following record:
.STDC 1.0 1.2 1.5 1.8 2.2 2.7 3.3 3.9 4.7 5.6 6.8 8.2
The values must be >= 1.0 and < 10.0 and must be in increasing
order as in the example above. If needed, continuation records
(see the example STDR record above) can be used.
If a STDC record is processed before the CKT record, any capaci-
tor values specified in the circuit will be changed to the clos-
est standard decade value. For example, a capacitor specified
as:
C c56 nd3 nd4 1.6582e-6
will be changed to a capacitor with value 1.8e-6 farads. The new
value, selected from the standard decade, will be shown on the
circuit listing in the ASCII output file.
Standard capacitor decades are easily added and removed from an
analysis by the use of the INC feature. For example, the fol-
lowing record would add a standard decade to an analysis:
.INC stdc.10
assuming that the file stdc.10 existed and consisted of the STDC
record shown above. To remove the standard decade, the INC
record could be commented out:
*.INC stdc.10
Elements whose values are changed via an ALTEL record are not
forced to be from a specified standard decade. This allows for
nonstandard capacitor values for selected capacitors during a
subsequent analysis of the circuit.
20
.STDL Record
This record is used to define an optional standard inductor
decade. If present before the CKT record (see below), the STDL
record will force the use of inductor values taken from a stand-
ard decade. Standard decades are defined by inductor manufactur-
ers and indicate what values are available for a particular
inductor series. For example, the ten percent standard inductor
decade has 12 values between 1.0 and 10.0. The ten percent
standard inductor decade could be defined to CCICAP with the
following record:
.STDL 1.0 1.2 1.5 1.8 2.2 2.7 3.3 3.9 4.7 5.6 6.8 8.2
The values must be >= 1.0 and < 10.0 and must be in increasing
order as in the example above.
If a STDL record is processed before the CKT record, any inductor
values specified in the circuit will be changed to the closest
standard decade value. For example, an inductor specified as:
L l23 nd1 nd2 8.3759e-3
will be changed to an inductor with a value of 8.2e-3 Henries.
The new value, selected from the standard decade, will be shown
on the circuit listing in the ASCII output file.
Standard inductor decades are easily added and removed from an
analysis by the use of the INC feature. For example, the fol-
lowing record would add a standard decade to an analysis:
.INC stdl.10
assuming that the file stdl.10 existed and consisted of the STDL
record shown above. To remove the standard decade, the INC
record could be commented out:
*.INC stdl.10
Elements whose values are changed via an ALTEL record are not
forced to be from a specified standard decade. This allows for
nonstandard inductor values for selected inductors during a
subsequent analysis of the circuit.
21
.AC Record
Requests a small signal AC analysis for the circuit. The '.'
before AC must be in the first column of the record. The AC
record contains four parameters which control the AC analysis:
.AC I1, I2, F1, F2
where
I1 : Number of frequency intervals to be calculated. If
frequency spacing is not linear (see I2) then I1 is the number of
intervals per frequency factor. Defaults to zero intervals (one
value of frequency).
I2 : Frequency factor. I2 = 0 or 1 results in linear spac-
ing of the calculated frequency intervals between F1 and F2. I2
= 2 results in I1 intervals per octave. I2 = 10 results in I1
intervals per decade. I2 >= 0. Defaults to linear spacing.
F1 : Starting frequency (>0).
F2 : Ending frequency (>F1).
The frequency and phase units default to Hertz and degrees. This
selection can be changed to radians per second and radians on the
OPT record.
The results format of an AC analysis defaults to dB and phase.
This format can be changed to either real and imaginary or magni-
tude and phase on the OPT record.
Examples:
.AC 100 10.e3 20.e3 * 100 intervals from 10KHz to 20KHZ
* or 10Krps to 20Krps.
.AC 50 10 1.0 100.0 * 50 pts/decade from 1. to
* 100.Hz or rps.
.AC 5, 2 10.0, 40.0 * 5 pts/octave from 10 to 40 Hz or rps.
.AC 25 10 6. 6.k * 25 pts/decade from 6 to 6K Hz or rps.
.AC 100. * zero intervals (one point) at 100. Hz or rps.
.AC CLR * clears existing AC record. Use with
* .ALTEL/.ALTGO control.
22
.DC Record
Requests a DC analysis of the network. The DC analysis is actu-
ally an AC analysis with the analysis frequency set to zero.
Note that a NOISE request will be invalid if any circuit element
is specified as having 1/f noise. There are no parameters on the
DC record.
Examples:
.DC
requests a DC analysis of the current circuit. Equivalent to the
following:
.AC * zero intervals, zero frequency.
23
.SENSA Record
Requests that absolute sensitivities be calculated for specified
circuit elements with respect to the first requested output
variable. The '.' before SENSA must be in the first column of
the record. The elements for which the absolute sensitivity will
be calculated are listed on the SENSA record. Absolute sensitiv-
ity can be calculated for the following element types: G, R, L,
C, IOA, VCC, CCC, VVC, CVC, and MUL. The sensitivity reported
for R elements will be that for the corresponding G element. The
sensitivity to the R value is obtained by multiplying the report-
ed sensitivity value by -1.0.
Sensitivities are calculated as part of an AC or VARY analysis.
An AC or VARY analysis (see AC ad VARY record descriptions) must
be requested for a SENSA analysis to be performed. Sensitivities
are calculated at the frequencies requested in the AC or VARY
analysis request.
Absolute sensitivities are defined as:
dO(jw)/dh
where O(jw) is the first requested output variable for the analy-
sis and h is the specified network element.
All sensitivities calculated are presented in real and imaginary
form. The sensitivity format is independent of the format re-
quested for the AC analysis.
Note that only a single SENSA or a single SENSR request can be
made for any one analysis.
Example:
.SENSA c1, r23, g4, c2, rx
24
.SENSR Record
Requests that relative sensitivities be calculated for specified
circuit elements with respect to the first requested output
variable. The '.' before SENSR must be in the first column of
the record. The elements for which the relative sensitivity will
be calculated are listed on the SENSR record. Relative sensitiv-
ity can be calculated for any conductor (G type element), resis-
tor (R type element), capacitor (C type element), inductor (L
type element), or multiplier (MUL type element) in the circuit.
The sensitivity reported for R elements will be that for the
corresponding G element. The sensitivity to the R value is
obtained by multiplying the reported sensitivity value by -1.0.
If sensitivities to the other elements listed under the SENSA
record description are requested as relative sensitivities,
absolute sensitivities will be calculated and reported.
Sensitivities are calculated as part of an AC or VARY analysis.
An AC or VARY analysis (see AC ad VARY record descriptions) must
be requested for a SENSR analysis to be performed. Sensitivities
are calculated at the frequencies requested in the AC or VARY
analysis request.
Relative sensitivities are defined as:
(h/O(jw)) * dO(jw)/dh
where O(jw) is the first requested output variable for the analy-
sis and h is the specified network element.
All sensitivities calculated are presented in real and imaginary
form. The sensitivity format is independent of the format re-
quested for the AC analysis.
Note that only a single SENSA or a single SENSR request can be
made for any one analysis.
Example:
.SENSR c3, r32, g8, cl, rb
25
.MSENS Record
Requests a multiparameter sensitivity [4, p. 204] calculation for
the circuit elements named on the SENSA or SENSR record. The
multiparameter sensitivity is defined as the complex sum of the
individual complex element sensitivities. A SENSA or a SENSR
record must also be included in the analysis. If a SENSA record
is included, the multiparameter sensitivity is the sum of the
appropriate absolute element sensitivities. If a SENSR record is
included, the multiparameter sensitivity is the sum of the appro-
priate relative element sensitivities.
.WSENS Record
Requests a worst case multiparameter sensitivity [4, p. 207]
calculation for the circuit elements named on the SENSA or SENSR
record. The worst case multiparameter sensitivity is defined as
the sum of the magnitudes of the individual complex element
sensitivities. A SENSA or a SENSR record must also be included
in the analysis. If a SENSA record is included, the multiparame-
ter sensitivity is the worst case sum of the appropriate absolute
element sensitivities. If a SENSR record is included, the multi-
parameter sensitivity is the worst case sum of the appropriate
relative element sensitivities.
.SSENS Record
Requests an RMS (square root of the sum of the squares) multipa-
rameter sensitivity [4, p. 204] calculation for the circuit
elements named on the SENSA or SENSR record. The RMS multiparam-
eter sensitivity is defined as the square root of the sum of the
squared magnitudes of the individual complex element sensitivi-
ties. A SENSA or a SENSR record must also be included in the
analysis. If a SENSA record is included, the multiparameter
sensitivity is the RMS value of the appropriate absolute element
sensitivities. If a SENSR record is included, the multiparameter
sensitivity is the RMS value of the appropriate relative element
sensitivities.
26
.NOISE Record
The NOISE record requests a frequency dependent noise analysis of
the circuit. The noise analysis is performed along with an AC or
VARY analysis. The noise analysis uses the noise parameters from
the OA, BJT, and FET models and generates noise sources for each
real resistor and conductance in the circuit. The magnitude of
the noise spectral density calculated at the first requested
output is provided as the first part of the noise result. The
units (either dB[magnitude / sqrt(Freq)] or magnitude /
sqrt(Freq)) are specified by the units selection parameters on
the OPT record. The second part of the noise result is the
integrated noise as described below. The units for integrated
noise are either Vrms or Arms. Note that a zero noise result can
only occur as a result of an error. For example, if the noise
from an op-amp is requested but the op-amp model does not have
specified noise parameters, a zero noise results.
The '.' before NOISE must be in the first column of the record.
NOISE record options
The NOISE record may optionally contain text parameters:
T1, T2, T3, ...
where T1, T2, T3, ... are element names whose noises are to be
included in the calculated output noise. If element names are
not specified on the NOISE record, then all circuit noise sources
are included in the calculated output noise. If element names
are included on the NOISE record, then only the noise sources
from the named elements are included in the noise calculation.
27
The NOISE record may optionally contain two real number parame-
ters:
F1, F2
where F1 and F2 define a noise bandwidth. If F1 is less than the
starting frequency specified on the AC record, F1 is reset to the
starting frequency. If F2 is greater than the final frequency
specified on the AC record, F2 is reset to the final frequency.
If F1 and F2 are not specified on the NOISE record, F1 is set to
the starting frequency and F2 is set to the final frequency
specified on the AC record. The total integrated noise at the
first requested output that results from the specified circuit
elements is calculated and displayed as the second part of the
noise result. At each frequency point in an AC analysis, the
integrated noise represents the total noise in a noise bandwidth
between F1 and the current frequency point. The final result is
duplicated at the termination of the AC analysis. The integrated
noise calculation is done using the Trapezoidal rule [3] for
numerical integration. It is up to the user to assure that the
frequency steps taken are sufficiently small to assure accuracy.
Examples:
.NOISE * ask for total circuit noise density at first
* requested output.
* Also provides total noise from all circuit
* elements between F1 and F2 specified on AC
* record.
.NOISE r3, amp1 * noise from elements r3 and amp1 only.
.NOISE r44 120. 3000. * integrated noise between 120. and
* 3000. Hz (or rps) from r44.
28
.VARY Record
The VARY record is used to specify a circuit element whose value
is to be varied over a specified range of values. The format of
the VARY record is as follows:
.VARY, T1, T2, I1, F1, F2, F3
where
T1 = 'AC' to indicate a variation during the AC analysis.
T2 = the name of the circuit element whose value is to be
varied.
I1 = the number of intervals in the variation.
F1 = the starting value of the variation.
F2 = the ending value of the variation.
F3 = the frequency at which to perform the variation.
During an AC analysis, the circuit will first be analyzed with
the nominal element values specified in the CKT to END section.
Following the nominal values analysis, the circuit will be ana-
lyzed at the specified frequency for each of the I1 + 1 values
specified on the VARY record. The nominal value of the circuit
element named by T2 is restored at the end of each element varia-
tion.
The entire analysis is repeated for each value specified on the
VARY record. This includes any requested responses, sensitivi-
ties, noises, and calculations. Integrated noise is not calcu-
lated during a variation analysis. The value of integrated noise
is set to zero in any variation results.
Up to five VARY records can be specified for any given run.
T1 = 'CLR' will clear any existing VARY requests. This can be
useful in combination with the ALTGO feature so that revised VARY
requests can be implemented.
Examples:
.VARY AC r34 10 .0001 100.
causes the value of r34 to be varied between .0001 and 100. ohms
over 10 intervals and for the analysis frequency to be set to 0.0
Hz. Note that specifying a zero value for a resistor will cause
an error. The value of r34 is restored to whatever value is
specified in the CKT to END section after the variation analysis
is complete.
29
.VARY AC Vin 100 -10.% +10.% 10.K
causes the value of circuit element Vin to be varied from 10%
below its nominal value to 10% above its nominal value in 100
intervals. The frequency is set to 10.0e3. The nominal value of
Vin is the value specified in the CKT to END section.
.VARY AC c44 9.44ufd 9.44ufd 10.0KHz
causes the circuit to be analyzed with the value of c44 set to
9.44 ufd (ie, zero intervals is the default) at a frequency of
10.0 KHz. This may be easier in some situations than using the
ALTEL / ALTGO syntax. The value of c44 is restored to whatever
value is specified in the CKT to END section after the variation
analysis is complete.
.VARY CLR
Clears all previous VARY requests and allows new requests to be
stored. This can be used with an ALTGO record as follows :
...
.END * end of CKT section.
.VARY CLR
.VARY ... (new requests)
...
.ALTGO * starts new analysis
...
30
.DELAY Record
The DELAY record requests the calculation of group delay during
an AC or VARY analysis. There are no parameters for this record.
An AC or VARY analysis must be requested for this record to have
an effect. If present, the DELAY record causes the group delay,
in seconds, of the first selected output to be recorded to both
the ASCII output file and to the binary output file or files, if
any.
31
.FSCALE Record
The FSCALE record can be used to frequency scale an entire cir-
cuit. The FSCALE record has a single parameter, the frequency
scale factor:
.FSCALE F1
where F1 must be a real number. If the FSCALE record is encoun-
tered prior to the CKT record, the capacitors and inductors in
the circuit description will be divided by F1. The frequency
scaling is applied before any adjustment to a standard decade is
performed (see STDR and STDC record descriptions).
Frequency scaling is applied only to elements specified via C and
L element records. The scaling is not applied to elements within
models.
The analysis frequencies specified on the AC record are multi-
plied by the frequency scale factor.
The analysis times specified on the TRAN record are divided by
the frequency scale factor.
.ZSCALE Record
The ZSCALE record can be used to impedance scale an entire cir-
cuit. The ZSCALE record has a single real parameter, the imped-
ance scale factor:
.ZSCALE F1
where F1 must be a real number. If the ZSCALE record is encoun-
tered prior to the CKT record, the inductor and resistor values
in the circuit description will be multiplied by F1 and the
capacitor values will be divided by F1. The impedance scaling is
applied before any adjustment to a standard decade is performed
(see STDR and STDC record descriptions). Elements within models
are not scaled by F1.
32
.TRAN Record
This record requests a time domain or transient analysis of the
circuit. The '.' before TRAN must be in the first column of the
record. The TRAN record contains four parameters which control
the analysis:
I1, I2, F1, F2
where
I1 : integer number of time steps to be calculated.
I2 : integer response code, 0 => impulse response,
1 => step response.
F1 : real, the analysis starting time.
F2 : real, the analysis end time.
The transient analysis always starts at time = 0.0 with the first
response calculated for time = (F2 - F1) / I1. Only the data
generated after time >= F1 is written to output file(s).
The number of time intervals refers to the number of intervals
calculated between the start and end times. The calculation time
step will be (F2 - F1) / I1. This time step will be used before
F1 if F1 > 0.0.
Examples:
.TRAN 100 0.0 1.0 * 100 steps from 0 to 1 second,
* impulse response.
.TRAN 5 1 5.e-9 20.e-9 * 5 intervals from 5 to 20 nsec,
* step response.
33
.IC Record
This record is used to establish initial conditions for the
transient analysis. The '.' before IC must be in the first
column of the record. The IC record has the following structure:
.IC name1 ic1 name2 ic2 ...
where namei is the name of the element whose initial condition
follows and ici is the value of the initial condition for the
element named by namei. Only C and L elements may have initial
conditions. If the named element is a capacitor, the ic is a
voltage. If the named element is an inductor, the ic is a cur-
rent. The ic values must be real numbers with an embedded '.'.
34
.PLOT Record
Each PLOT record produces a plot of requested outputs using
frequency, time, or values of a VARY element as the independent
variable. The format for PLOT records is as follows:
.PLOT T1 T2 T3 T4 ... F1 F2 ...
where
T1 : Analysis type code. Plots of the AC analysis results
are requested with T1 = 'AC'. Plots of the TRANsient analysis
results are requested with T1 = 'TR'.
T1 = 'CLR' will clear any previous plot requests. This can
be useful in combination with the ALTGO feature so that new or
revised plots can be requested.
T2 : Plot form code. Currently supported forms are:
'80' -
80 column ASCII printer plot.
'132' -
132 column ASCII printer plot.
'GP01' -
Epson double density graphics mode. This mode
provides 120 dots per inch horizontal resolution
and 8 dots per pass of the print head vertically.
GP01 plots are scaled horizontally for 8.5 inch
paper. The vertical size of the plot is determined
by the number of intervals specified on the AC or
TRAN record. 500 intervals is appropriate for 11
inch paper on an Epson LQ-1000. Values for the
independent variable are printed.
'GP02' -
Same as 'GP01' mode except that numerical values
for the independent variable and the first request-
ed dependent variable are printed.
'GP03' -
Produces plots for the Micro Peripherals Inc. 150G
graphics printer. Provides 85 dots per inch hori-
zontal resolution. GP01 plots are scaled horizon-
tally for 8.5 inch paper. The vertical size is
determined by the number of intervals specified on
the AC, TRAN, or VARY records.
'GP04'
Same as 'GP03' mode except that numerical values
for the independent variable and the first request-
ed dependent variable are printed.
35
T3 : This field is used for two different purposes. If the
plot is to have either frequency or time as the independent
variable then T3 identifies the first dependent variable (see
below). If the plot is to use the values of a variable element
(specified on a VARY record) as the independent variable, then T3
is used to identify the variable element by name and the variable
name will be used to label the independent axis of the plot. If
T3 is the name of a VARY element then the values of the VARY
element will be used as the independent variable.
(T3), T4, T5, ... : If T3 names a VARY element, the plot
will use the values of the named element as the independent
variable and T4, T5, ... are used to name the requested dependent
(output) variables. If T3 does not name a VARY element, then T3,
T4, T5, ... are used to name the requested dependent (output)
variables. Up to 5 dependent variables may be requested on a
single PLOT record. Variable names must exist in the current
circuit description and are limited to the names of VM and AM
elements in the circuit description, the names defined on CALC
records (see CALC record description), or the pre-defined names
listed below.
Each output variable name may optionally be FOLLOWED by a '<' or
a '>' to indicate the first or second part of a two part output
variable respectively. This convention allows plotting, for
example, the magnitude (first part, '<') or phase (second part,
'>') from an output request in the AC analysis mode. Note that
the options '<' and '>' only make sense for 'AC' plot requests
where the variables have two parts and are ignored if encountered
on 'TR' plot requests. If a '<' or '>' is not included, the
first part of the requested output variable is assumed.
Predefined PLOT names
Several pre-defined names are available. These names provide
access to noise, delay, and multi-parameter sensitivity measures.
The pre-defined names are as follows:
NDM (noise density measure from a .NOISE request)
INM (integrated noise measure from a .NOISE request)
MSM (multiparameter sensitivity measure from a .MSENS
request)
WSM (worstcase sensitivity measure from a .WSENS request)
SSM (RMS sensitivity measure from a .SSENS request)
DLY (group delay from a .DELAY request)
36
PLOT pointer variables
The convention described for T4, T5, ... does not permit request-
ing individual component sensitivity results. These outputs are
not named by CCICAP. To request these variables, or any other
variable, the use of 'pointers' is allowed. Plot variables can
be requested by their positions in the output data structure.
The output data structure is available in the CCICAP ASCII output
datafile. At each requested value of the independent variable
(frequency, time, or VARY element value) there will be an array
of outputs. The independent variable value is array element 1.
For AC analysis results, element 2 is the first part of the first
printed output in the output file, element 3 is the second part
of the first printed output in the output file, etc. For TRAN-
sient analysis results, element 2 is the first printed output in
the output file, element 3 is the second printed output in the
output file, etc. See the examples below for the way to use
position pointers. See Appendix A for a further discussion of
the output data structure.
PLOT scaling limits
F1, F2, ... : These fields are optional plot limit sets for
the requested variables. The limits allow the user to set the
minimum and maximum on-scale values for each variable. Each
requested variable requires two limits. The first limit is the
lower plot limit, the second is the upper plot limit. If the
limits are not included, or if both limits are specified as 0.0,
the plot is automatically scaled so that all data is plotted.
PLOT files
All plot requests normally produce PLOT files in the default disk
directory. Plot files are named PLOTmmnn.AC or PLOTmmnn.TR where
the AC extension results from data generated during an AC analy-
sis and the TR extension results from data generated during a
TRansient analysis. The number 'mm' refers to the current cir-
cuit description and 'nn' is a plot sequence number within the
current circuit analysis and any ALTERations of the current
circuit. The first analysis of a run generates plot files named
PLOT00mm. The first plot file generated during the analysis is
name PLOT0000. The second plot file is named PLOT0001, etc. The
first plot file generated from a second circuit, defined after a
NEXT record, is named PLOT0100, etc.
If the word PLTP is included on the current OPT record the re-
quested files will be directed to the attached 'prn' device
(normally the system printer). See discussion under OPT record.
37
Examples:
.PLOT AC 132 eout eout > 0.0 0.0 -180. 180.
or
.PLOT AC 132 eout 0. 0. eout > -180. 180.
Produces a 132 column ASCII plot of the AC data for the first
part of eout and the second part of eout. The first part of eout
will be automatically scaled by CCICAP. The second part of eout
will be plotted between the limits of 180. and -180.
.PLOT AC 80 eout eout 0. 0. -.5 .5
Produces an 80 column ASCII plot of the AC data. The variable
eout (first part) is plotted with both automatically scaled
limits and user specified limits of -.5 to .5.
.PLOT AC GP01 NDM INM ^19
Produces a graphics plot file of the noise density measure, the
integrated noise measure, and the 19th value in the output array
from the current AC analysis with automatically scaled plot
limits. The file will be named PLOTmmnn.AC where 'mm' will be
the current NEXT number for the run and 'nn' will be the number
of the plot as produced by the current circuit. For example, if
the above PLOT request results in the 20th plot produced by the
3rd circuit in a run, the resulting plot file will be named
PLOT0319.AC.
.PLOT TR 132 eout ^7
Produces a 132 column ASCII plot of the TRansient data. The
variable eout and the seventh variable in the output structure
are plotted with automatically scaled plot limits.
.PLOT AC GP04 r45 iout
Produces a graphics plot file using the values of r45 for the
independent variable values. The element r45 must have been
specified on a VARY AC request in the current analysis. The
output iout is used as the dependent variable and is plotted
between automatically scales limits.
38
.PLOT CLR
Clears all previous PLOT requests and allows new plot requests to
be stored. This can be used with an ALTGO record as follows :
... (end of .CKT section)
.END
.PLOT CLR
.PLOT ... (new requests)
...
.ALTGO * starts new analysis
...
39
.ZDLY Record
The ZDLY record is used to change the displayed frequency scale
for digital system analysis. Normally each DEL element in a
digital system analysis corresponds to a normalized (one second)
delay, for which the Nyquist interval is between 0.0 and pi
radians per second or 0.0 and 0.5 Hz. The apparent Nyquist
interval can be scaled by using the ZDLY record. The format for
the ZDLY record is as follows:
.ZDLY F1
where
F1 : implied sampling interval. F1 defaults to 1.0, re-
stricting the useful frequency range on an AC record to 0.0 to .5
Hz (0.0 to pi rps) for an AC analysis of a digital system.
Example:
.ZDLY 50.usec
Sets the apparent sampling rate to 20 KHz and the unit delay to
50 usec. The analysis frequencies on an AC record should be
between 0.0 and 10 KHz to stay within the Nyquist interval.
Note that the use of the ZDLY record is strictly for convenience.
Network formulation for digital systems are based on a unit delay
for each DEL element. The calculations performed by CCICAP use a
scaled frequency appropriate for unit delays of one second.
Identical results from a digital system analysis will occur by
not using the ZDLY record and restricting the requested analysis
frequencies to between 0.0 and 0.5 Hz or 0.0 and pi rps.
40
.CKT Record
The circuit description follows the CKT record. The '.' before
CKT must be in the first column of the record. Only comment and
element records can be placed between the CKT record and the END
record (see below).
Element records
The order of the elements within the circuit description is not
important, although it is recommended that source elements be
placed at the beginning of a circuit description. The element
type code (R, C, IOA, etc.) must be in the first column of an
element record and must be capitalized.
The first field following the element type code is the user given
name for the element being defined. Following the name field are
two, three, or four node names followed by a value if required.
The name for ground nodes must be either '0', 'GND', 'Gnd', or
'gnd'.
For all circuit elements the element name and node names are
text. The value field is a real.
Each element record describes one circuit element.
TWO TERMINAL ELEMENTS
Input Voltage Source
V, name, node1, node2, amplitude, phase (degrees)
Voltage is Vnode1 - Vnode2, phase is optional, defaults to 0.0.
Input Current Source
I, name, node1, node2, amplitude, phase (degrees)
Current is from node1 to node2 through the source, phase is
optional, defaults to 0.0.
Resistor
R, name, node1, node2, value
Conductance
G, name, node1, node2, value
Capacitor
C, name, node1, node2, value
41
Inductor
L, name, node1, node2, value
Voltmeter
VM, name, node1, node2
Measured voltage is Vnode1 - Vnode2.
Ammeter
AM, name, node1, node2
Measured current is from node1 to node2, nodes 1 and 2 are short-
ed.
Input Node (digital system element)
IN, name, node1, gnd, amplitude
Output Node (digital system element)
OUT, name, node1, gnd
Multiplier Branch (digital system element)
MUL, name, node1, node2, value
Node1 variable is multiplied by 'value' and added to node2.
Delay Branch (digital system element)
DEL, name, node1, node2
A unit delay is inserted between node1 and node2.
42
MULTI-TERMINAL ELEMENTS
Ideal Operational Amplifiers
IOA, name, node1, node2, node3, node4
node1 : non-inverting input
node2 : inverting input
node3 : output
node4 : output reference
Operational Amplifiers
OA, name, node1, node2, node3, model name
node1 : non-inverting input.
node2 : inverting input.
node3 : output.
model : refers to previously named model.
Example:
OA, amp1, ein+, ein-, eout, 741
Field Effect Transistor
FET, name, node1, node2, node3, model name
node1 : gate.
node2 : source.
node3 : drain.
model : refers to previously named model.
Bipolar Junction Transistor
BJT, name, node1, node2, node3, model name
node1 : base.
node2 : emitter.
node3 : collector.
model : refers to previously named model.
43
CONVERTERS
Current to Current Converter
CCC, name, node1, node2, node3, node4, value
Controlling current is from node1 to node2, output current is
from node3 to node4, value is current gain (A/A).
Current to Voltage Converter
CVC, name, node1, node2, node3, node4, value
Controlling current is from node1 to node2, output voltage is
Vnode3 - Vnode4, value is transresistance (ohms).
Voltage to Current Converter
VCC, name, node1, node2, node3, node4, value
Controlling voltage is Vnode1 - Vnode2, output current is from
node3 to node4, value is transconductance (mhos).
Voltage to Voltage Converter
VVC, name, node1, node2, node3, node4, value
Controlling voltage is Vnode1 - Vnode2, output voltage is Vnode3
- Vnode4, value is voltage gain (V/V).
44
.END Record
Marks the end of the circuit description and requests analysis of
the current circuit as defined between the CKT and END records.
The '.' before END must be in the first column of the record.
Example:
.END
.ALTEL Record
The ALTEL record provides altered circuit element values for a
subsequent analysis. The format for the ALTEL record is:
.ALTEL name1 value1 name2 value2 ...
where namei is a text element name and must refer to an existing
circuit element and valuei is a real value which is to replace
the current value for element namei. The values for resistors,
capacitors, inductors, VCC elements, CCC elements, VVC elements,
CVC elements, I sources, and V sources can be ALTered. The phase
for I and V sources cannot be ALTered.
The ALTEL record must appear after the CKT - END records.
The use of continuation records is allowed with ALTEL records.
The effect of ALTEL records is accumulative since the circuit
element values are not restored to the original values after an
ALTered circuit is analyzed. Multiple ALTEL records can be used
to alter large numbers of circuit elements.
The changes specified on ALTEL records are not effective until a
subsequent ALTGO record is encountered.
Example:
.ALTEL r45 2.385e3 ein 2.5
+ c3 1.55e-8
After the above record the current circuit (defined by a previous
CKT - END section) will contain modified element values for the
elements r45, c3, and ein. The elements r45, c3, and ein must
have been defined in the previous CKT - END section. The ALTered
circuit will be analyzed when an ALTGO record is encountered.
Only if a legal ALTEL record is encountered will the alteration
number of the run be incremented.
45
.ALTGO Record
The ALTGO record is used to start an analysis using previously
ALTered element values and/or changed run control records and/or
titles.
Note that replacement TITLE, AC, TRAN, IC, SENSA, and SENSR
records may be inserted between the END record and an ALTGO
record or between two ALTGO records. The analyses specified on
these replacement records will be initiated by the following
ALTGO record. If no replacement TITLE, AC, TRAN, IC, SENSA, or
SENSR records are inserted between the END and ALTGO records, the
previous run control records are reused.
PLOT requests will be reused from the previous analysis. If new
PLOT requests are required, the old PLOT requests can be cleared
by the use of the 'CLR' option on a PLOT request. New PLOT
requests can then be entered for the ALTGO analysis.
VARY requests will be reused from the previous analysis. If new
VARY requests are required, the old VARY requests can be cleared
by the use of the 'CLR' option on a VARY request. New VARY
requests can then be entered for the ALTGO analysis.
Examples:
.ALTEL r23 3.45k
.ALTGO
To change a plot request:
...
.PLOT CLR * clear old plot requests.
.PLOT AC GP01 eout * new plot request for this analysis.
.ALTGO * new analysis with revised plot(s).
...
To change the VARY request:
...
.VARY CLR
.VARY ... (new requests)
.ALTGO
...
To generate a new plot and title from existing DATAmmnn.AC:
...
.AC CLR * get rid of AC request.
.PLOT CLR * clear existing PLOT requests.
.PLOT AC GP02 eout * new PLOT request, part of a plot
* only run since AC request removed.
.TITLE New Title for plot of variable 'eout'
.ALTGO * initiate the plot only run.
...
46
.NEXT Record
Sets up for a completely new subsequent circuit definition to
follow. The '.' before NEXT must be in the first column of the
record.
Example:
.NEXT
.STOP Record
Terminates execution of CCICAP and returns control to MSDOS. The
'.' before STOP must be in the first column of the record.
Example:
.STOP
47
Suggested Practice
Order of input records
The input records can be ordered as indicated in the table of
contents. There are a few restrictions on the placement of input
records. The title record is always the first non-comment record
encountered.
The PAGE, OPT, FILE, TEMP, MODEL, AC, TRAN, IC, SENSR, SENSA,
MSENS, WSENS, SSENS, NOISE, FSCALE, ZSCALE, STDR, STDC, STDL,
PLOT, VARY and CALC records must come before the circuit descrip-
tion section (CKT to END) if they are to be effective during the
analysis of the circuit.
As previously discussed, there can be only comment and element
description records between the CKT and END records and all
element description records must be between the CKT and END
records. The ALTEL and ALTGO records should come after the CKT -
END section and before the NEXT or STOP records.
It is suggested that sources (V and I elements) be placed at the
beginning of the CKT section.
File naming convention (suggested only, not required)
Extension Contents
---------------------------------------------------------
.INP Files which are specified as input files
on the command line.
.OUT Files which are specified as output files
on the command line.
.MDL Model description files to be INCluded
from .INP files.
.CTL Control record files, to be INCluded from
.INP files.
.CKT Circuit description files, starting with
.CKT and ending with .END, to be INCluded
from .INP files.
.ALT Alternate element value files, starting
with one or more .ALTEL records and ending
with a .ALTGO record, to be INCluded from
.INP files.
Using this approach, the contents of a .INP file could have this
structure:
* file circuit.inp - 04/10/89 - mas
Test circuit for CCICAP
.INC circuit.ctl * add the run control records.
.INC \ccicap\models\opamp.mdl * add required model
* from models directory.
.INC circuit.ckt * add the circuit description and run.
.INC circuit.alt * alter the circuit and rerun.
.STOP
48
The above example could be run from the following command line if
the output file was to go to the current directory:
>ccicap circuit.inp circuit.out
Batch file use
A simple batch file that will run a circuit prepared as indicated
above and plot any resulting plots can be created as follows:
echo off
del plot*.*
ccicap %1.inp %1.out
copy plot*.* prn
If the batch file is named 'cap.bat', a CCICAP analysis can be
done by entering the following command line:
>cap circuit
where 'circuit' is the name of an existing CCICAP analysis file
with a '.inp' extension. The ASCII output will be placed in a
file named 'circuit.out'.
Excessive output
Runs prepared for GP01 plots (with a large number of calculated
intervals) or with several VARY records or ALTER phases can
produce copious quantities of output directed to the ASCII output
file. To avoid running out of disk space, direct the ASCII
output file to the printer (have lots of paper in place!), the
console (CON), or the null (NUL) device. The analysis will run
fastest with output directed to the null device. The compressed
data will be saved to disk if there is a FILE record in the run
or if any PLOTs are requested. Plots can then be obtained using
plot only runs to access the compressed data files.
Another method of reducing the size of ASCII output files is to
use the NTAB option on the OPTions record. This option will
print out the tabular data heading but will suppress the printing
of the data itself. The tabular data heading can be used to
document what variables are available in the compressed data
files.
Plot only runs
Plot only runs can be used to access preexisting DATA files on a
disk. The runs can be used to avoid having to repeat an entire
analysis if the desired plot data is stored in the DATA files.
To perform a plot only run, simply remove or comment out any AC,
DC, or TRAN records and leave the CKT to END section of the run
unchanged.
49
Plot only runs can change the circuit output variables that are
plotted as long as the requested outputs were specified in the
original analysis run. The new outputs need not have been plot-
ted in the original run. Plot limits can be altered on the PLOT
records of a plot only run. The run title can be changed and the
new title will appear on any plots resulting from the plot only
run.
The PLOT files will be renumbered according to the request se-
quence in the plot only run. Note that this means any pre-
existing PLOT files may be overwritten.
50
References
1. Vlach, Jiri and Kishore Singhal, Computer Methods for Circuit
Analysis and Design, Van Nostrand Reinhold:New York, c 1983.
2. van der Ziel, A., "Thermal Noise in Field-Effect
Transistors," Proceeding of the IRE, Vol. 50, pp1808-1812, 1962.
3. Press, William H., et. al., Numerical Recipes; The Art of
Scientific Computing, Cambridge University Press:Cambridge, c
1986.
4. Bruton, Leonard T., RC-Active Circuits; Theory and Design,
Englewood Cliffs, New Jersey:Prentice-Hall, Inc., 1980.
51
Appendix A
Binary Data Files Contents and Output Data Structures
CCICAP can produce binary data output files when the FILE record
is included and will produce binary data output files when one or
more plots are requested. Two types of binary files are pro-
duced, one for the normal analysis DATA and one for the data
produced by any VARY records. The files are unformatted data
files.
The first type of data file, the file which results from an AC or
TRANsient request, is named DATAmmnn.AC or DATAmmnn.TR. The
number mm (between 00 and 99) refers to the circuit number of the
run. The first circuit described is numbered 00, the circuit
described after the first NEXT record is numbered 01, etc. The
number nn (between 00 and 99) refers to the circuit alteration
number. The original circuit is numbered alteration 00, the
circuit resulting at the first ALTGO record is numbered 01, etc.
In the first type of data file the first record consists of three
FORTRAN 4 byte integers
N1, N2, N3
where N1 is the number of data sets which are to follow in the
file, N2 is the number of dependent variables in each of the
sets, and N3 is a format descriptor related to the units of the
data which follows.
N3 is defined as follows:
Let 2**n point to the n'th bit of the 32 bit integer value N3
where 2**0 is the lsb, etc. Then
2**0 = 1 => results are from an AC analysis, for which:
2**4 = 0 => Frequency units are rps.
2**4 = 1 => Frequency units are Hertz.
2**5 = 0 => Response units are real, imaginary.
2**5 = 1 => Response units are dB, phase.
2**6 = 1 => Response units are magnitude, phase.
2**1 = 1 => results are from a TRAN analysis, for which:
2**4 = 0 => Response is the impulse response.
2**4 = 1 => Response is the step response.
52
The subsequent records are the data sets which consist of single
precision FORTRAN reals:
Independent variable 1, data1, data2, ..., dataN2.
Independent variable 2, data1, data2, ..., dataN2.
...
Independent variableN1, data1, data2, ..., dataN2.
The ordering of the variables is the same as that in the ASCII
file created during the analysis.
For example, an AC analysis with two requested V or I outputs, a
single requested calculated response, two requested element
sensitivities, a worst case sensitivity, and a noise output would
produce data sets and an ASCII output data structure with the
following composition:
Position Variable
------------------------------------------------------
1 Frequency : independent variable
2 First output : real part, magnitude, or dB
3 First output : imaginary part or phase
4 Second output : real part, magnitude, or dB
5 Second output : imaginary part or phase
6 Calculated response: real part, magnitude, or dB
7 Calculated response: imaginary part or phase
8 First sensitivity : real part
9 First sensitivity : imaginary part
10 Second sensitivity : real part
11 Second sensitivity : imaginary part
12 Worst case sens. : value
13 Worst case sens. : no imag. part, set = 0.0
14 Noise output : volts or amps/sqrt(Hz) or
dBvolts or dBamps/sqrt(Hz)
15 Integrated noise : volts or amps
53
The binary files are created by FORTRAN unformatted writes. The
data can be recovered by FORTRAN unformatted reads such as:
c open the input file ...
open(luin, file = infile)
c read in the data structure integers ...
read(luin) n1, n2, n3
c read in the real data ...
do 30 i = 1, n1
do 10 j = 1, n2 + 1
read(luin) xt(j)
10 continue
x(i) = xt(1)
do 20 j = 2, n2 + 1
y(i, j - 1) = xt(j)
20 continue
30 continue
where 'infile' defines the name of the CCICAP generated file from
which data is recovered. After the above statements, x(i) will
contain the i'th value of the independent variable and y(i, j)
will contain the N2 independent variables associated with x(i).
A slightly different format is used for data resulting from any
VARY requests. All VARY data resulting from a given circuit or
circuit alteration is stored in a single file named VARYmmnn.AC
or VARYmmnn.TR where mm and nn are as described for the DATAmmnn
files above. The first record in the file consists of four four-
byte FORTRAN integers
N1, N2, N3, N4
where N1 is not currently used (set to one), N2 is the number of
dependent variables in each data set, N3 is the same as described
above for the AC or TRANsient results data files, and N4 is the
number of VARY elements in the run that produced the VARY data
file.
Each VARY analysis produces N_VARY data sets with N2 dependent
variables. The second record in the file consists of N4 four-
byte FORTRAN integers whose value equals the number of intervals
requested on the VARY records.
The third and subsequent records consist of N2 + 1 FORTRAN single
precision reals. Each record records the value of the independ-
ent variable (the VARY element) followed by the values of the N2
dependent variables that result.
54
Appendix B
Noise Models
CCICAP models the white noise sources associated with all real
resistances and active elements. In addition, a 1/f noise corner
can be specified for sources in the active elements.
Resistor noise
Resistor noise is calculated from the thermal noise formula:
en = SQRT(4. * k * T * R) Vrms / sqrt(Hz)
where k is Boltzman's constant (1.38e-23), T is the temperature
in degrees Kelvin (set by the TEMP record or defaulted to
298.16K), and R is the resistance in ohms. The calculated noise
results are spectral densities with units of volts per root Hertz
or amps per root Hertz.
Op-amp noise
Op-amp noise is calculated from the voltage and current spectral
densities provided by the user on the MODEL record. These param-
eters are often available from the manufacturer's data sheets.
The corner frequencies for voltage and current 1/f noise can also
often be obtained or at least estimated from data sheets. The
voltage spectral density source is added at the input to the op-
amp, effectively in series with the non-inverting input terminal.
The current spectral density source is added at each input termi-
nal to ground.
55
BJT noise
BJT noise is calculated from three sources. The thermal noise of
Rbb' is calculated from the thermal noise equation given above
for resistor noise. The shot noise of the collector and base
currents is calculated from the shot noise formula:
in = SQRT(2. * q * Idc)
where q is the electronic charge (1.602e-19 C) and Idc is the DC
current in question. The collector and base bias currents can be
specified on the MODEL record. If the collector current is not
specified it is estimated from the equation for the transconduct-
ance parameter:
Ic = Gm * k * T / q
where Gm is the transconductance parameter provided for the
model. Similarly, if the base bias current is not specified on
the MODEL record, the base bias current is estimated from the
device beta which is calculated from the Gm and Rb'e parameters
as:
beta = Gm * Rb'e
so that
Ib = Ic / beta.
If the noise contribution from the collector current is not
desired, set the collector current equal to a negative value on
the MODEL record. If the noise contribution from the base cur-
rent is not desired, set the base current to a negative value on
the MODEL record.
FET noise
FET noise sources include the shot noise and 1/f noise of the
drain and gate currents and a thermal noise associated with the
resistive channel. The shot noise sources are calculated from
the user specified drain and gate bias currents. The thermal
source is calculated from an effective channel noise resistance
given as [2]:
Rn = .67 / Gm
where Gm is the user specified device transconductance.
56
Circuit Concepts, Inc. Software Registration Form
CCICAP may be registered by sending this completed form and
$75.00* to:
Circuit Concepts, Inc.
6955 Santa Fe Drive
Houston, Texas 77061
Office : 713-643-5451
FAX : 713-643-6131
By registering you will receive the latest version of CCICAP, a
printed user's guide, and free telephone support.
Thank you for registering CCICAP!
Name :_____________________________________________
Company :_____________________________________________
Address :_____________________________________________
_____________________________________________
City :_____________________________________________
State :_____________________________________________
Zip Code :____________________
Country :_____________________________________________
* - Owners of previous versions of CCICAP may register for $25.00
by including the serial number from the previous version of
CCICAP.
Serial Number :_________________________________________
57